From 2a729c92d6b9584bb96fc25959da97c5e923f84a Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 9 Mar 2001 12:38:54 +0000 Subject: [PATCH] (Fwrite_region) [DOS_NT]: Remove O_TRUNC from open flags argument to emacs_open; it seems to conflict with O_EXCL. --- src/fileio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index dc087873988..fb40e549710 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4684,8 +4684,8 @@ This does code conversion according to the value of\n\ #else /* not VMS */ #ifdef DOS_NT desc = emacs_open (fn, - O_WRONLY | O_TRUNC | O_CREAT | buffer_file_type - | (mustbenew == Qexcl ? O_EXCL : 0), + O_WRONLY | O_CREAT | buffer_file_type + | (EQ (mustbenew, Qexcl) ? O_EXCL : O_TRUNC), S_IREAD | S_IWRITE); #else /* not DOS_NT */ desc = emacs_open (fn, O_WRONLY | O_TRUNC | O_CREAT -- 2.30.2